<%@page import="com.xxb.entity.User"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.xxb.entity.CartItem"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>达芙妮官方购物网-订单完成</title>
		<link href="style/cart4css.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div id="header">
			<div class="logo"></div>
			<div class="login"> 
                <%
					User user = (User)session.getAttribute("curruser");
				 	if(user == null){
				 %> 
				<a href="main.jsp">您好，欢迎观临达芙妮官方购物网</a>&nbsp;&nbsp; 
           		<a href="l_to_login.jsp" >登陆</a> 
                |
				<a href="l_to_reg.jsp" >注册</a>
           		<%}else{ %>
           		<a href="main.jsp">您好，<%=user.getName() %></a>&nbsp;&nbsp;
           		<a href="l_exit.jsp" >退出</a> 
                |
				<a href="l_member.jsp" >会员管理平台</a>
           		<%} %> 
			</div>
			<div class="menu">
				<ul>
                    <li class="a" style="width:111px;"><a href="main.jsp">首页</a></li>
                    <li class="b" style="width:95px;"><a href="#">新品</a></li>
                    <li class="c" style="width:119px;"><a href="#">凉鞋</a></li>
                    <li class="d" style="width:95px;"><a href="danxie.jsp">单鞋</a></li>
                    <li class="e" style="width:95px;"><a href="#">靴子</a></li>
                    <li class="f" style="width:119px;"><a href="#">包.饰品</a></li>
                    <li class="g" style="width:119px;"><a href="#">特价专区</a></li>
				</ul>
				<div class="cart">
                        购物车（1）
					<a href="cart.jsp" style="text-decoration:none"><input type="button" value="去结算" style="cursor:pointer"/></a>
				</div>
			</div>
			<div class="search">
				<div class="hottag" style="margin-top:0px;margin-bottom:0px;width:480px;">
                    热门分类：&nbsp;
                    <a href="#">单鞋</a>&nbsp;|&nbsp;
                    <a href="#">高跟鞋</a>&nbsp;|&nbsp;
                    <a href="#">鱼嘴</a>&nbsp;|&nbsp;
                    <a href="#">平底</a>&nbsp;|&nbsp;
                    <a href="#">坡跟</a>&nbsp;|&nbsp;
                    <a href="#">真皮</a>
				</div>     
				<div class="searchinput">
                    <input type="text" class="search-area"/>
                    <input type="button" class="search-button"/>
				</div>	
			</div>
		</div>
		<div id="content">
			<div class="current">
				当前位置：
				<a href="main.jsp">首页</a> > 购物车
			</div>
			<div class="pic">
				<p class="step2">1.加入购物车》2.编辑订单》3.确认订单》4.订单成功</p>
				<p class="explain">
				<img src="images/title4.gif"/>
				</p>
			</div>
			<div class="check">
			<%
				
					List<CartItem> shopcar = (List<CartItem>)session.getAttribute("shopcar"); 
					float total = 0f;
					
						for(CartItem item : shopcar){
					 		 
							 if(item != null){
							 	total += item.getTotal(); 
							}
						}
			 		String oid = request.getParameter("oid");
			 %>
				<span>
				感谢<%=user.getName() %>  您的订单已经成功提交。<br/>
				本次的订单号为：<%=oid %> (请记住该订单号，方便以后查询)<br/>
				您的该笔订单金额为  <%=total %>元。
				</span>
				<div class="button"><a href="l_pay.jsp"><input type="button"/></div></a>
			</div>
			<div style="margin-top:40px;text-align:right">
				<a href="main.jsp" style="width:113px;height:45px;"><input class="oo" type="button"></a>
			</div>
		</div>
		<div id="footer">
			<img src="images/tel.jpg" style="float:right"/>
			<img src="images/footer.PNG" style="margin-top:10px;"/>
			<div class="footerf">
				<img src="images/foot-logo.jpg" style="float:right"/>	
			</div>
			<div style="margin-top:27px;float:right">
				<img src="images/oo.PNG" style="float:right"/>
			</div>
		</div>
	</body>
</html>